package com.uenpay.im.panel;

import com.qiyunxin.android.http.common.SystemUtil;
import com.uenpay.im.R;

import java.io.File;

/**
 * @author SL
 * @created 2016-4-11 下午5:57:09
 * @copyRight http://www.qiyunxin.com
 * @function TODO
 */
public class QyxAudioManage {

	public static String getRecorderPath() {
		String root_path = SystemUtil.GetExternalStorageDir() 
				+ File.separator;
		return root_path + "record.amr";
	}
	
	/**
	 * 录音中语音动画数组（PS：图片）
	 */
	public static final int[] audioRecordVolumeResource = new int[] {
			R.drawable.icon_audio_record_volume1,
			R.drawable.icon_audio_record_volume2,
			R.drawable.icon_audio_record_volume3,
			R.drawable.icon_audio_record_volume4,
			R.drawable.icon_audio_record_volume5 };

	/**
	 * 删除文件
	 * 
	 * @param path
	 */
	public static void deleteCacheLog(String path) {
		File file = new File(path);
		if (file.exists()) {
			if (file.isFile()) {
				file.delete();// 删除该文件
			}
		}
	}
	
	public static long getCurrentSeconds() {
		return (long) (System.currentTimeMillis() / 1000);
	}

}
